package com.itheima.day15.fanshe;

public class Test {
    //获取class对象的三种方式(反射的源头)
    public static void main(String[] args) throws Exception {
        //1.类名.class
        Class c1 = Dog.class;
        System.out.println(c1);
        //2.Class.forName("全类名")！！！（推荐使用）
        Class aClass = Class.forName("com.itheima.day15.fanshe.Dog");
        System.out.println(aClass);
        //3.对象.getClass()
        Dog d = new Dog();
        Class c2 = d.getClass();
        System.out.println(c2);
    }
}
